SERVER_NAME="leancloud-proxy-0.0.1.jar"

pid=$(ps -ef | grep ${SERVER_NAME} | grep -v "grep" | awk '{print $2}')

if [ -n "$pid" ]; then
    echo [$SERVER_NAME] will be killed......
    kill -15 $pid
    sleep 5
fi

java -jar ${SERVER_NAME} -Xmx128m -Xms128m &
echo ${SERVER_NAME} starting......

